/**
 * 
 */
package core.proxy;

import core.interfaces.WFQueue;
import core.manager.Manager;
import core.manager.Workflow;
import core.util.COREServiceRegistry;
import org.apache.log4j.Logger;

/**
 * Proxy corrispondente al WFQueueManager
 * @author Vincenzo Merlo, Scuderi Giovanni Luca, Paolo Giuffrida
 *
 */
public abstract class WFQueueManagerProxy implements WFQueue {

    @SuppressWarnings("unused")
	private final Logger logger = COREServiceRegistry.getLogger(WFQueueManagerProxy.class.toString()); //istanza log4j

    /* (non-Javadoc)
     * @see core.interfaces.WFQueue#dequeue()
     */

    /**
     * costruttore di default
     */
    public WFQueueManagerProxy()
    {
        super();
    }

    /**
     *
     * @return
     */
    /*@Override
    public synchronized Workflow dequeue() {
        return ((Manager) Manager.getInstance()).dequeue();
        
    }*/

    /* (non-Javadoc)
     * @see core.interfaces.WFQueue#enqueue(core.manager.Workflow)
     */
    /**
     * Accoda al manager il workflow
     * @param wf Workflow da accodare
     * @return indice interno del manager
     */
    @Override
    public int enqueue(Workflow wf) {
        return ((Manager) Manager.getInstance()).enqueue(wf);        
    }
}
